package com.mw.job.bean;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * Created by mengdexuan on 2017/9/19 13:21.
 */
@Component
@ConfigurationProperties(prefix = "disruptor")
@Data
public class DisruptorProperties {
	private Integer consumerThreadNum;
	private Integer bufferSize;
	private String loopTime;
	private Boolean cornTask;


	public Boolean getCornTask(){
		try {
			Long.parseLong(loopTime);
		}catch (Exception e){
			return true;
		}
		return false;
	}
}
